feat(kbc): rename compile box image to siclaw-kbc-box and pod prefix to kbc-box#442
Closed
LikiosSedo wants to merge 1 commit into
Closed
feat(kbc): rename compile box image to siclaw-kbc-box and pod prefix to kbc-box#442LikiosSedo wants to merge 1 commit into
LikiosSedo wants to merge 1 commit into
Conversation
…to kbc-box Motivation (operations): during production troubleshooting every pod was named `agentbox-<id>`, so a KB compile box and a chat agentbox could only be told apart by label/image filtering — the compile box has bitten on-call more than once. Make the compile box distinguishable at a glance. Changes: - Image rename `kbc-compile-box` -> `siclaw-kbc-box` (Makefile build/push, helm `siclaw.compileBoxImage` derivation, values, README/docs). The explicit `agentbox.compileBoxImage` override semantics are unchanged. - Pod-name prefix declared on the BoxProfile (`podNamePrefix`): `kb-compile` and `kb-compile-codex` spawn as `kbc-box-<id>` instead of `agentbox-<id>`. Derived resources (cert Secret, hostname) follow the prefix. Chat agentboxes and the read-only, ephemeral `kb-test` box keep the `agentbox-` prefix. - Upgrade compatibility: on the first post-upgrade compile spawn the spawner reaps any pod left under the old `agentbox-<id>` name for that agent (guarded to compile boxes only — a chat box under the same name is never touched), so old and new pods do not coexist. - Keep AgentBoxManager consistent with the spawner: its pod-name lookup is now profile-aware too, and `stop(runId, profile)` / `getAsync(runId, profile)` receive the run's profile. Without this the capability reap would 404 on the old name and leak the renamed compile pod, and adopt would miss the live box. Transition: - `make push-kbc` double-pushes the same image digest under the legacy name `kbc-compile-box` for one release cycle so runtimes still pinned to it keep resolving. Remove the legacy tag/push next release. - DevOps: add a registry replication rule (ap-southeast -> cn-shanghai) for `siclaw-kbc-box` (the old name was not in the rule and had to be pushed by hand). Until then, push `siclaw-kbc-box` to cn-shanghai manually for prod. Tests: box-profile / k8s-spawner / manager suites green, including new coverage for the kbc-box prefix, the legacy-pod reap, the chat-pod guard, and the profile-aware stop/getAsync lookups.
Collaborator
Author
|
Consolidated into #446 per owner request; review history stays here. This PR will be closed once the batch merges. |
LikiosSedo
added a commit
that referenced
this pull request
Jul 23, 2026
…le pods Integration fix for the #442 × #444 merge interaction. #442 renamed the compile-box pod prefix (agentbox- → kbc-box-, profile-derived) and updated onReap/onAdopt to pass rec.profile, but left the other capability call sites resolving the pod name with the default "agentbox" prefix. On main that was correct (every box was agentbox-); after the rename those sites silently point at a pod name the compile box no longer uses, so in K8s mode: - capability.testClose reports a LIVE test session as already-closed - capability.testSessions (new in #444, which reused testClose's pattern) lists no sessions for a live compile run - capability.cancel and the ensureCapabilitySession cleanup paths 404 on stop() and leak the pod instead of reaping it (ghost cleanup) Pass the run's profile at every capability-box site so getAsync/stop build the kbc-box- prefix. The profile comes from the in-memory run record, or — for the restart-safe paths (testClose/testSessions/cancel) where the record may be gone — is recovered from the consumer store via adopt(notifyOnAdopt:false), which never reattaches a relay or spawns a box. Unknown profile falls back to the default prefix (the pre-rename behavior). Chat-agent paths (chat.sessionStatus, agent.clearMemory, agent.terminate) are intentionally left on the default prefix — they operate on chat agentIds, not capability runs. Tests: memory-cold testClose/testSessions now assert getAsync is called with the recovered "kb-compile" profile (→ kbc-box-<id>); cancel asserts stop carries the profile for both in-memory and store-only runs.
Collaborator
Author
|
Superseded by #446 (platform hardening batch); branch retained. |
pull Bot
pushed a commit
to TheTechOddBug/siclaw
that referenced
this pull request
Jul 23, 2026
Rename compile box image to siclaw-kbc-box and pod prefix to kbc-box; upgrade cleans old pods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation (operations)
During production troubleshooting every pod is named
agentbox-<id>, so a KB compile box and a chat agentbox can only be told apart by label/image filtering — the compile box has bitten on-call more than once. This makes the compile box distinguishable at a glance inkubectl get pods.Changes
kbc-compile-box→siclaw-kbc-box: Makefile build/push targets, helmsiclaw.compileBoxImagederivation,values.yaml, README/docs. The explicitagentbox.compileBoxImageoverride semantics are unchanged.podNamePrefix, platform-style — noif profile==in the spawner):kb-compileandkb-compile-codexspawn askbc-box-<id>instead ofagentbox-<id>. Resources derived from the pod name (cert Secret, hostname) follow the prefix. Chat agentboxes and the read-only, ephemeralkb-testbox keep theagentbox-prefix (see note below).agentbox-<id>name for that agent — guarded to compile boxes only (boxTypelabelkb-compile*), so a chat box under the same name is never touched. This prevents the old and new pods from coexisting after upgrade.AgentBoxManagerindependently computes the pod name for warm-reuse / liveness / stop, and it sits on the capability reap+adopt path. Its lookup is now profile-aware, andstop(runId, profile)/getAsync(runId, profile)receive the run's profile. Without this, the capability reap would 404 on the oldagentbox-name and leak the renamed compile pod, and adopt would miss the live box after a runtime restart.Transition (one release cycle)
make push-kbcdouble-pushes the same image digest under the legacy namekbc-compile-boxso runtimes still pinned to it during the rename window keep resolving. Remove the legacy tag/push next release.siclaw-kbc-box. The oldkbc-compile-boxwas not in the replication rule and had to be pushed to Shanghai by hand; the new name needs a rule so this stops being manual. Until the rule lands, pushsiclaw-kbc-boxto cn-shanghai manually for production.Verification
helm templatesmoke:compileBoxEnabled=truerendersSICLAW_COMPILE_BOX_IMAGE = {registry}/siclaw-kbc-box:{tag}; explicitcompileBoxImageoverride passes through unchanged; default stays dark (no env, fail-closed).box-profile,k8s-spawner, andmanagersuites, including new coverage for: thekbc-boxprefix on compile pods (chat staysagentbox), the legacy-pod reap on upgrade, the chat-pod guard (never reaped), and the profile-awarestop/getAsynclookups.Note / scope decision
Per the spec, only the two compile profiles get the
kbc-boxprefix. The read-onlykb-testbox (short-lived, discarded after a test session, still on thesiclaw-kbc-boximage) keeps theagentbox-prefix. If we want test-session boxes distinguishable too, that is a one-line follow-up (podNamePrefixonkb-test), but it was intentionally left out of scope here.